<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <button onClick="clicks()">点击</button>

    <script>
        //Html事件缺点：Html和Js 没有分开，代码量太大，维护麻烦
        function clicks(){
            console.log('点击了')
        }
    </script>
</body>
</html>